<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增学生礼物信息')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-liwu-add">
        <input name="delFlag" class="form-control" type="hidden" th:value="${delFlag}">
        <div class="form-group">
            <label class="col-sm-3 control-label">姓名：</label>
            <div class="col-sm-8">
                <input name="xingMing" class="form-control" type="text" th:value="${xingMing}" readonly>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">礼物：</label>
            <div class="col-sm-8">
                <select name="liWu" class="form-control m-b" th:with="type=${yzLiwus}">
                    <option th:each="dict : ${type}" th:text="${dict.liWuMingCheng}" th:value="${dict.liWuMingCheng}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">领送人：</label>
            <div class="col-sm-8">
                <!--<select name="lingSongRen" class="form-control m-b" th:with="type=${@dict.getType('lingSongRen')}">
                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                </select>-->
                <input name="lingSongRen" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">送达时间：</label>
            <div class="col-sm-8">
                <div class="input-group date">
                    <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    <input name="songDaShiJian" class="form-control" placeholder="yyyy-MM-dd" type="text" required th:value="${songDaShiJian}" readonly>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注信息：</label>
            <div class="col-sm-8">
                <textarea name="remark" maxlength="500" class="form-control" rows="3"></textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "system/liwu"
    $("#form-liwu-add").validate({
        focusCleanup: true
    });

    function submitHandler(index, layero, calback) {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-liwu-add').serialize(), calback);
        }
    }

    $("input[name='songDaShiJian']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>
